import xadmin
from mall.models import Product

class ProductAdmin(object):
    """商品信息"""
    # 配置列表中默认显示的列
    list_display = ('name', 'types', 'price')
    # 快捷搜索
    list_filter = ('types', 'status')
    # 按关键字搜索
    search_fields = ('name',)


xadmin.site.register(Product, ProductAdmin)

